﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Production.DomainLib.AggregatesModel.ProductionOrderAggregate;

namespace Production.InfrastructureLib.EntityConfigurations;

public class ProductionOrderEntityTypeConfiguration : IEntityTypeConfiguration<ProductionOrder>
{
    public void Configure(EntityTypeBuilder<ProductionOrder> builder)
    {
        builder.ToTable("MES_PRODUCTIONORDER");

        builder.HasKey(o => o.Id);

        builder.Ignore(b => b.DomainEvents);
    }
}